<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:icecore="http://www.icefaces.org/icefaces/core"
	xmlns:ace="http://www.icefaces.org/icefaces/components"
	xmlns:ice="http://www.icesoft.com/icefaces/component">
<h:head>
	<title>Pistas disponibles</title>

</h:head>
<h:body styleClass="ice-skin-rime">
	<h:form id="form">
	<ice:panelGrid columns="3">
		<ice:outputText>Bienvenido: </ice:outputText>
		<ice:outputText value="#{pistaBean.nombre}"></ice:outputText>
		 <ice:outputLink value="personal.xhtml" target="_self">Mis reservas</ice:outputLink>
	</ice:panelGrid>
	
		<ice:dataTable value="#{pistaBean.pistas}" var="pista">
			<ice:column style="width:20%;">
				<ice:graphicImage 
         		url="#{pista.src_imagen}"
                 width="150"
                 height="150"                    
                 alt="#{pista.deporte}"/>
			</ice:column>
			<ice:column style="width:10%;">
					<ice:outputText value="Deporte: "></ice:outputText>
					<ice:outputText value="#{pista.deporte}"></ice:outputText>
			</ice:column>
			<ice:column style="width:20%;">
					<ice:outputText value="Disponible: "></ice:outputText>
					<h:commandButton  type="submit" value="Seleccionar" action="#{pistaBean.seleccionar}" disabled="#{pista.disponible}">
						<f:param name="idPista" value="#{pista.id_pista}"/>
					</h:commandButton>
			</ice:column>
		</ice:dataTable>
	</h:form>
</h:body>
</html>